package com.app.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.common.entity.Orders;

import java.util.List;

/**
 * @author 王鑫
 * @create 2020 -11 -24 11:57
 */
public interface OrdersServer extends IService<Orders> {

    //生成订单的Order对象
    Orders createOrders(Orders orders, String userId, String pileId);

    //添加订单(Redis)
    int addorders(Orders orders);

    //通过id删除订单
    void deleteOrderById(String id);

    //修改订单
    void updataOrder(Orders orders);

    //通过id查询订单
    Orders selectOrderById(String id);

    //查询所有订单
    List<Orders> selectAllOrders();

    //分页查询所有订单
    void selectOrdersByPage(Page<Orders> page);

    //多条件分页查询订单
    void selectOrdersByPageAndCondition(Page<Orders> page, Orders orders);

    //通过UserId查询订单
    List<Orders> selectOrderByUserId(String userId);

    //生成订单的Order对象(账号添加)
    Orders generateOrders(Orders orders, String userPhone, String pileId);
}
